<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-08-17
    	描述：申请审核
    -->
	<div class="Announcements">
		<div class="Website-visits">
			<div class="location">
				<div class="location-text fl">
					<img class="location-img fl" src="../../images/BaseManager/shenghe.png" />
					<p class="fr">申请审核</p>
				</div>
				<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
			</div>
			<div class="PressRelease-list">
				<table>
					<thead>
						<tr>
							<th class="table-text-th1">基地名称</th>
							<th class="table-text-th1">基地类别</th>
							<th class="table-text-th1">申请时间</th>
							<th class="table-text-th1">申请信息</th>
							<th class="table-text-th1">申请事项</th>
							<th class="table-text-th1">审核状态</th>
							<th class="table-text-th1">操作</th>
						</tr>
					</thead>
					<tbody>
						<tr v-if="total==0">
							<td colspan="7" class="center">暂无数据！</td>
						</tr>
						<tr v-for="base in baseData">

							<td :title="base.name"> <span class="show-twoline">{{base.name}}</span></td>
							<td>{{base.type == 0?'现代农业综合示范基地':base.type == 1? '现代农业特色产业基地':base.type == 2?'乡村建设研究实践基地':base.type == 3?'新农村建设分布式服务站':'其他' }}</td>
							<td>{{formatData(base.createAt)}}</td>
								<td><input @click="projectDetails(base.id)" type="button" value="查看" class="delete write" /></td>
								<td v-if="base.status == 2">
									<input style="width: 100px" @click="viewOut(base)" type="button" value="基地退出申请" class="delete write" />
								</td>
								<td v-if="base.status == 4">基地新增申请</td>
								<td>待审核</td>
								<td v-if="base.status == 4"><input @click="demand(base.id, base.status)" type="button" value="通过" class="through" /> |
									<input @click="unmadn(base.id)" type="button" value="不通过" class="through" />

								</td>
								<td v-if="base.status == 2">
									<input @click="unDemand(base.id)" type="button" value="通过" class="through" />|
									<input @click="theDem(base.id)" type="button" value="不通过" class="through" />
								</td>

						</tr>

					</tbody>
				</table>
				<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
				<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
			</div>
		</div>

		<!--基地退出原因"  v-show="temApplicationStatus"-->
		<div v-show="temApplicationStatus" class="tenant-model">
			<div class="tenant-model-content Application pass-reason">
				<header class="tenant-model-header">
					<h3>退出原因</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain out-reason">
						<!--模态框内容板块-->
						<div class="rork">
							退出原因：
							<div>{{base.quitReason}}</div>
						</div>
						<p>附件：<span class="attachment" @click="openUrl(base.quitFile)"><a ></a>预览</span></p>
						<!--<div class="rork">
                            <p>未通过理由：不符合基地退出条件</p>
                            <p>附件：<span class="attachment">基地退出驳回书</span></p>
                        </div>-->

					</div>
				</div>
				<!--<footer class="tenant-model-footer">
					<button class="determine" @click="closeModel">确认</button>
				</footer>-->
			</div>
		</div>

		<!-- - 不通过 退出 模态框-->
		<div v-if="ProjectModelShow" class="tenant-model">
			<div class="tenant-model-content  disagree">
				<header class="tenant-model-header">
					<h3>不通过</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--		&lt;!&ndash;模态框内容板块&ndash;&gt;-->
						<form class="form-box">
							<div class="form-line input-required">
								<label class="textarea-label">内容：</label>
								<div class="input-box textarea-box">
									<textarea id="reason"></textarea>
								</div>
							</div>
							<div class="form-line imgbox">
								<label class="textarea-label">附件：</label>
								<input name="reasonFile" type="hidden" v-model="reasonFile" />
								<input type="file" id="handIdFront" accept=".txt,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.exe,image/*" @change="idFrontImg($event)" style="display: none;" />
								<!--		<a  class="Public-btn1 uploadbtn handIdFrontA " @click="touchOffIdInput(1)">上传附件</a>
                <a  class="Public-btn1 uploadbtn handIdFrontA " @click="delAtt()">删除附件</a>-->

								<a @click="touchOffIdInput(1)">上传附件</a>
								<a @click="delAtt()" v-if="FileUpload.length">删除附件</a>

								<ul class="img-box" v-if="FileUpload.length">
									<li v-for="item in FileUpload">{{item}}</li>
								</ul>
							</div>
						</form>
					</div>
				</div>
				<footer class="tenant-model-footer">
					<button class="determine" @click="unSubData">确定</button>
				</footer>
			</div>
		</div>

		<!--查看-模态框-->
		<div v-if="Application" class="tenant-model">
			<div class="tenant-model-content ApplicationStatus">
				<header class="tenant-model-header">
					<h3>查看申请信息</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--模态框内容板块-->
						<form class="form-box look-model">
							<div class="form-line ">
								<label class="label-three">基地名称：</label>
								<div class="input-box">
									{{base.name}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">基地类别：</label>
								<div class="input-box">
									{{base.type == 0?'现代农业综合示范基地':base.type == 1? '现代农业特色产业基地':base.type == 2?'乡村建设研究实践基地':base.type == 3?'新农村建设分布式服务站':'其他' }}

								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">基地地址：</label>
								<div class="input-box">
									{{base.address}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">申请单位：</label>
								<div class="input-box">
									{{base.unit}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">通讯地址：</label>
								<div class="input-box">
									{{base.correspondenceAddress}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">联系人：</label>
								<div class="input-box">
									{{base.contact}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-three">联系方式：</label>
								<div class="input-box">
									{{base.theContact}}
								</div>
							</div>
							<div class="form-line ">
								<label class="label-four">财务联系人：</label>
								<div class="input-box form-line-box">
									{{base.financialContact}}
								</div>
							</div>
							<div class="form-line Website-right">
								<label class="label-two">财务联系电话：</label>
								<div class="input-box form-line-box">
									{{base.contactNumber}}
								</div>
							</div>
							<div class="form-line Website-right ">
								<label class="label-one">附件：</label>
								<div class="input-box form-line-box">
									<a @click="openUrl(base.attachment)">预览</a>
								</div>
							</div>

							<div class="form-line Website-right  Website-right-introduce">
								<label class="label-three">基地简介：</label>
								<div class="input-box">
									{{base.introduction}}
								</div>
							</div>
							<div class="form-line search-boxs imgbox Website-right">
								<label class="label-three">基地图片：</label>
								<div class="imgbtn">
									<img :src="thatUrl+ base.picture" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>

		<!-- 选择基地负责人-模态框-->
		<div v-if="demandModelShow" class="tenant-model">
			<div class="tenant-model-content demandModel">
				<header class="tenant-model-header">
					<h3>选择基地负责人</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain checkbox">
						<!--模态框内容板块-->
						<div class="fl">
							<input class="search" id="name" type="text" autocomplete="off" />
							<input class="btn" type="button" @click="getAllUser" value="搜索" />
						</div>
						<table>
							<tr>
								<th v-if="utotal!=0"></th>
								<th>姓名</th>
								<th>身份证号码</th>
								<th>当前是否为基地负责人</th>
							</tr>
							<tr v-if="utotal==0">
								<td colspan="3" class="center">暂无数据！</td>
							</tr>
							<tr v-for="u in user">
								<td v-if="utotal!=0"><label><input type="radio" @click="checkUserId(u.id)" name="baseRadio" ><i>✓</i></label></td>
								<td>{{u.user_name}}</td>
								<td>{{u.user_account}}</td>
								<td>{{u.count == 0?'否':'是'}}</td>
							</tr>

						</table>
						<pageination :total="utotal" :size="usize" :page="upage" :changge="pageFn1" @child="obtainChild1"></pageination>
						<div class="demandModel-btn">
							<button @click="subBase">确认</button>
						</div>

						<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->


					</div>
				</div>
			</div>
		</div>
	</div>
</template>
<script src="./ToApplyForReview.js"></script>

<style scoped>
	@import "ToApplyForReview.css";
</style>
